package com.memento.pattern;

import lombok.Getter;
import lombok.Setter;

/**
 * @author chenchen
 * @description
 * @date 2023/11/17 14:41
 */
@Getter
public class Originator {

    @Setter
    private String state;

    public Memento saveStateToMemento(){
        return new Memento(state);
    }

    public void getStateFromMemento(Memento Memento){
        state = Memento.getState();
    }
}
